package com.zzl.finance.data.constant;

/**
 * 账户类型 0基本户1一般户2专用3临时4 注册账户
 *
 * @author : gull
 * @date : 2022/2/16 15:02
 */
public enum AccountTypeEnum {
    /**
     * 账户类型 0基本户1一般户2专用3临时4 注册账户
     */
    ACCOUNT_TYPE_BASIC(1, "基本户"),
    ACCOUNT_TYPE_COMMON(2, "一般户"),
    ACCOUNT_TYPE_SPECIAL(3, "专用"),
    ACCOUNT_TYPE_TEMPORARY(4, "临时"),

    ;


    private final Integer code;
    private final String value;


    AccountTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }


    public static String getValue(Integer code) {
        for (AccountTypeEnum statusEnum : AccountTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
